home *** CD-ROM | disk | FTP | other *** search
Wrap
/* * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. * All Rights Reserved. * * The information in this file is provided for the exclusive use of * the licensees of The Santa Cruz Operation, Inc. Such users have the * right to use, modify, and incorporate this code into other products * for purposes authorized by the license agreement provided they include * this notice and the associated copyright notice with any such product. * The information in this file is provided "AS IS" without warranty. */ /* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ /* Portions Copyright (c) 1979 - 1990 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ /* UNIX System Laboratories, Inc. */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #ifndef _MATH_H #ifndef _PARAMS #if defined(__STDC__) || defined(__cplusplus) #define _PARAMS(ARGS) ARGS #else #define _PARAMS(ARGS) () #endif #endif /* _PARAMS */ #define _MATH_H #ident "oldstyle @(#) math.h 20.1 94/12/04 " #pragma pack(4) #ifndef _STRUCT_EXCEPTION #define _STRUCT_EXCEPTION struct exception { int type; char *name; double arg1; double arg2; double retval; }; #endif /* _STRUCT_EXCEPTION */ extern int matherr _PARAMS((struct exception *)); extern int errno; extern double log1p(), expm1(); extern double atof _PARAMS((const char *)), frexp _PARAMS((double, int *)), ldexp _PARAMS((double, int)), modf _PARAMS((double, double *)); extern double j0 _PARAMS((double)), j1 _PARAMS((double)), jn _PARAMS((int, double)), y0 _PARAMS((double)), y1 _PARAMS((double)), yn _PARAMS((int, double)); extern double erf _PARAMS((double)), erfc _PARAMS((double)); extern double exp _PARAMS((double)), log _PARAMS((double)), log10 _PARAMS((double)), pow _PARAMS((double, double)), sqrt _PARAMS((double)); extern double floor _PARAMS((double)), ceil _PARAMS((double)), fmod _PARAMS((double, double)), fabs _PARAMS((double)); extern double gamma _PARAMS((double)); extern double hypot _PARAMS((double, double)); extern double sinh _PARAMS((double)), cosh _PARAMS((double)), tanh _PARAMS((double)); extern double sin _PARAMS((double)), cos _PARAMS((double)), tan _PARAMS((double)), asin _PARAMS((double)), acos _PARAMS((double)), atan _PARAMS((double)), atan2 _PARAMS((double, double)); extern double scalb _PARAMS((double, double)), logb _PARAMS((double)), nextafter _PARAMS((double, double)), acosh _PARAMS((double)), asinh _PARAMS((double)), atanh _PARAMS((double)); extern double cbrt _PARAMS((double)), copysign _PARAMS((double, double)), lgamma _PARAMS((double)), rint _PARAMS((double)), remainder _PARAMS((double, double)); extern int unordered _PARAMS((double, double)), finite _PARAMS((double)), isnan _PARAMS((double)), ilogb(); #define MAXFLOAT ((float)3.40282346638528860e+38) #define HUGE MAXFLOAT #ifndef HUGE_VAL extern double __huge_val; #define HUGE_VAL (__huge_val) #endif extern int signgam; #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 #define M_LN2 0.69314718055994530942 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_PI_2 1.57079632679489661923 #define M_PI_4 0.78539816339744830962 #define M_1_PI 0.31830988618379067154 #define M_2_PI 0.63661977236758134308 #define M_2_SQRTPI 1.12837916709551257390 #define M_SQRT2 1.41421356237309504880 #define M_SQRT1_2 0.70710678118654752440 #define _ABS(x) ((x) < 0 ? -(x) : (x)) #define _REDUCE(TYPE, X, XN, C1, C2) { \ double x1 = (double)(TYPE)X, x2 = X - x1; \ X = x1 - (XN) * (C1); X += x2; X -= (XN) * (C2); } #define DOMAIN 1 #define SING 2 #define OVERFLOW 3 #define UNDERFLOW 4 #define TLOSS 5 #define PLOSS 6 #define _POLY1(x, c) ((c)[0] * (x) + (c)[1]) #define _POLY2(x, c) (_POLY1((x), (c)) * (x) + (c)[2]) #define _POLY3(x, c) (_POLY2((x), (c)) * (x) + (c)[3]) #define _POLY4(x, c) (_POLY3((x), (c)) * (x) + (c)[4]) #define _POLY5(x, c) (_POLY4((x), (c)) * (x) + (c)[5]) #define _POLY6(x, c) (_POLY5((x), (c)) * (x) + (c)[6]) #define _POLY7(x, c) (_POLY6((x), (c)) * (x) + (c)[7]) #define _POLY8(x, c) (_POLY7((x), (c)) * (x) + (c)[8]) #define _POLY9(x, c) (_POLY8((x), (c)) * (x) + (c)[9]) #pragma pack() #endif /* _MATH_H */